import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooDeveloperAccountController } from '../../../controllers';
const uctoodeveloperAccountRouter = new Router();
const developerAccountController = new uctooDeveloperAccountController();

uctoodeveloperAccountRouter.post('/add', requireUser, developerAccountController.add);
uctoodeveloperAccountRouter.post('/edit', requireUser, rowLevelPermission('uctoo/developer_account'), developerAccountController.edit);
uctoodeveloperAccountRouter.post('/del', requireUser, rowLevelPermission('uctoo/developer_account'), developerAccountController.delete);

//For getting developerAccount with permission control
uctoodeveloperAccountRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/developer_account'), developerAccountController.getSingle);
uctoodeveloperAccountRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/developer_account'), developerAccountController.getMany);
uctoodeveloperAccountRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/developer_account'), developerAccountController.getMany);

//#endregion AutoCreateCode
export default uctoodeveloperAccountRouter;
